<template lang="pug">
    skin(@up="up",@down="down",@yes="yes",@back="back")
        div(class="flex-column charge-exhaust-reset")
            div(class="flex-column-item flex-center-center h3 under-line") ----推进排气----
            div(class="flex-column-item center")
                span 排气中: {{remaining}}U
            div(class="flex-column-item center")
                span
            div(class="flex-column-item center")
                span(style="display:block;" class="selected-text") 请断开输注管路！
</template>

<script>
    export default {
        data() {
            return {
                activeId: 0,
                page: {maxResultCount: 3, skipCount: 0},
                visible: false,
                amount: 19.6,
                reseted: false, // 复位完成
                interval: null,
                remaining: 0, // 剩余的排气量
            };
        },
        computed: {},
        methods: {
            up() {

            },
            down() {

            },

            back() {
                this.$router.push('index?index=1')
            },
            yes() {

            }
        },
        mounted() {
            this.interval = setInterval(function () {
                let afterReduce = (window.excharge.exhaustTotal * 10 - 1.2 * 10) / 10; // 减去1.2后的剩余可以排气的量
                if (afterReduce > 0) {
                    window.excharge.exhaustTotal = afterReduce;
                } else {
                    window.excharge.exhaustTotal = 0;
                    this.reseted = true;
                    clearInterval(this.interval);
                }
                this.remaining = window.excharge.exhaustTotal;
            }.bind(this), 500);
        }
    };
</script>

<style lang="less">
</style>
